#pragma once
#include <QtGui>

namespace Xps
{
	class SelectorModel;

	class AssetSelector : public QDialog
	{
		Q_OBJECT

	private:
		QPushButton* okay;
		QPushButton* cancel;
		
		QWidget* setupHeader(QString, QString head_rsc);
		QWidget* setupButtonPanel();

	public:
		AssetSelector(QWidget* parent = 0, QString title = "", QString rsc = "", SelectorModel* model = 0);
		~AssetSelector(void);
		virtual QWidget* setupContent(QAbstractItemModel* model);
		virtual void accept();
		int selectedAsset();

	protected:
		QWidget* content;
		QWidget* head;
		QTableView* lv;

	public slots:
		void validateSelection();
	};
}